package Demo10;

import java.util.*;
import java.util.stream.Stream;


public class StreamDemo {
    public static void main(String[] args) {
        //集合流
        List<String> list = new ArrayList<>();
        Stream<String> s1 = list.stream();

        //Map流
        Map<String,Integer> maps = new HashMap<>();
        //键流
        Stream<String> keys = maps.keySet().stream();
        //值流
        Stream<Integer> values = maps.values().stream();
        //键值对流
        Stream<Map.Entry<String,Integer>> kvStream = maps.entrySet().stream();

        //数组
        String[] str = {"a","b"};
        //Arrays工具类
        Stream<String> s2 = Arrays.stream(str);
        //Stream类静态方法
        Stream<String> s3 = Stream.of(str);
    }
}
